Skip to content

Keep typing indicators alive across chat re-entry - #261

Open
FrankBStack wants to merge 1 commit into
OpenBubbles:rustpushfrom
FrankBStack:fix/typing-indicator-persistence
Open

Keep typing indicators alive across chat re-entry#261
FrankBStack wants to merge 1 commit into
OpenBubbles:rustpushfrom
FrankBStack:fix/typing-indicator-persistence

Conversation

@FrankBStack

Copy link
Copy Markdown

Typing indicator state lived on the ConversationViewController, so backing out of a chat and reopening it lost the indicator even though the other person was still typing. The expiry was also a Future.delayed(...).asStream() subscription that held onto the old controller after it was disposed.

Changes:

  • Per-chat typing state (handles + expiry data) now lives in ChatManager, keyed by chat guid, so it outlives any one view controller.
  • The one-minute expiry is a plain Timer; a fresh typing packet restarts it, a stop packet or an incoming message cancels it.
  • ConversationViewController.showTypingIndicatorFor / typingIndicatorData are now getters over the shared state, so the existing UI code is unchanged.
  • Typing state is cleared on data reset alongside contacts.

Typing state was stored on the ConversationViewController, so leaving a
chat and coming back dropped the indicator even though the other side
was still typing, and the expiry future kept a reference to the dead
controller. Move the per-chat typing state into ChatManager, use a
plain Timer for the one-minute expiry, and clear it all on data reset.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant